package com.openfeign.service;

import com.example.comment.config.Result;
import com.example.comment.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author kuang
 * @Date 2021/8/15 21:34
 */
@Component
@FeignClient(value = "PAYMENT")
public interface PaymentOpenFeign {

    @GetMapping("/payment/query/{id}")
    Result<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping(value = "/payment/feign/timeout")
    String timeOut();
}
